import json

from tqdm import tqdm


path =r"E:\BL_dataset\舆情数据集\integeated\800__200_200_200_200\data.json"

c1, c2, c3, c4, c5 = 0, 0, 0, 0, 0

with open(path, 'r', encoding='utf-8') as fp:
    datas = json.load(fp)

for data in tqdm(datas):
    if data["label"] == 1:
        c1 += 1
    elif data["label"] == 2:
        c2 += 1
    elif data["label"] == 3:
        c3 += 1
    elif data["label"] == 4:
        c4 += 1
    else:
        c5 += 1

print("%d  %d  %d  %d  %d          %d" % (c1, c2, c3, c4, c5, c1+c2+c3+c4+c5))

